From 55bc52de405f8fc5ff37a465ce8280868f791fec Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 26 Apr 2009 01:36:39 +0000 Subject: [PATCH] (calc-set-mode-line): Check to make sure that the correct Calc buffer gets "Embed" in the mode line. (calc-mode): Copy stack list for additional Calc buffers. --- lisp/calc/calc.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index e1496da8d62..00a33f59374 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1335,6 +1335,7 @@ Notations: 3.14e6 3.14 * 10^6 (calc-refresh t) (calc-set-mode-line) (calc-check-defines) + (if calc-buffer-list (setq calc-stack (copy-list calc-stack))) (add-to-list 'calc-buffer-list (current-buffer) t)) (defvar calc-check-defines 'calc-check-defines) ; suitable for run-hooks @@ -1657,7 +1658,9 @@ See calc-keypad for details." (figs (nth 1 calc-float-format)) (new-mode-string (format "Calc%s%s: %d %s %-14s" - (if calc-embedded-info "Embed" "") + (if (and calc-embedded-info + (eq (aref calc-embedded-info 1) (current-buffer))) + "Embed" "") (if (and (> (length (buffer-name)) 12) (equal (substring (buffer-name) 0 12) "*Calculator*")) -- 2.30.2